//CBEGIN_CPP
//LAST MODIF 7/12/2008
#include "CBegin.h"
#include <iostream>

using namespace std;
// ------------
//  Constructeur
// ------------
Begin::Begin()
{
    m_carre = 2;
}
void Begin::intro()
{

    cout << "Ici ce trouve l'intro !\n\n\n";
    system("PAUSE");
}

int Begin::menuPrincipale()
{
    int b = -1;
    do
    {
            system("CLS");
            cout << "\t\t\tLight oF Fantasy\n\n\n\n\n\n\n\n";
            cout << "\t\t...\t"     << " ........ " << " ...........\t"  << "........ " << endl;
            cout << "\t\t...\t"     << " ........ " << " ..........\t"   << "........ " << endl;
            cout << "\t\t...\t"     << " ..    .. " << " ...\t"          << "\t..    .. " << endl;
            cout << "\t\t...\t"     << " ..    .. " << " ...\t"          << "\t..    .. " << endl;
            cout << "\t\t...\t"     << " ..    .. " << " ...  .....\t"   << "..    .. " << endl;
            cout << "\t\t...\t"     << " ..    .. " << " ...  .....\t"   << "..    .. " << endl;
            cout << "\t\t...\t"     << " ..    .. " << " ...    ...\t"   << "..    .. " << endl;
            cout << "\t\t.......\t" << " ........ " << " ..........\t"   << "..    .. " << endl;
            cout << "\t\t.......\t" << " ........ " << " ..........\t"   << "........ " << "\n\n\n\n\n\n\n\n";
            cout << "\n\n\n\n\n";
        if ( m_carre == 2 )
        {
            cout << "\n\t\t\t     CONTINUER    \n";
            cout << "\t\t\t     ---------    \n";
            cout << "\t\t\t _________________\n";
            cout << "\t\t\t|                 |\n";
            cout << "\t\t\t| Nouvelle Partie |\n";
            cout << "\t\t\t|_________________|\n\n";
            cout << "\t\t\t       Credit      \n";
            cout << "\t\t\t       ------      \n";
            cout << "\t\t\t        EXIT       \n";
            cout << "\t\t\t       ------      \n";
            cout << "\n\n\n\n\n\n\n\n";
            cout << "........                ..          ...         ...........             ..."       << endl;
            cout << "........	       ....         ...         ...........             ..."       << endl;
            cout << "..    ..              ......        ...         ...                     ..."       << endl;
            cout << "..    ..             ........       ...         ...                     ..."       << endl;
            cout << "..    ..            ..........      ...         .........               ..."       << endl;
            cout << "........   .....       ....         ...         ..........   .....      ..."       << endl;
            cout << "........   .....       ....         ...                 ..   .....   .........."  << endl;
            cout << "..    ..               ....         ...         ...     ..            ........"    << endl;
            cout << "..    ..               ....         ...         ...     ..             ......"     << endl;
            cout << "........               ....         ...         ..........              ...."      << endl;
            cout << "........               ....         ...         ..........               .."       << endl;
            /*
            cout << "                                                                       ";
            cout << "m_carre = " << m_carre;
            cout << "                                                     ";
            cout << "8 = Haut 5 = Bas  0 = Entre" << endl;*/
        }
        if ( m_carre == 3 )
        {
            cout << "\t\t\t _________________\n";
            cout << "\t\t\t|                 |\n";
            cout << "\t\t\t|    CONTINUER    |\n";
            cout << "\t\t\t|_________________|\n";
            cout << "\t\t\t                   \n";
            cout << "\t\t\t  Nouvelle Partie  \n";
            cout << "\t\t\t  ---------------  \n\n";
            cout << "\t\t\t       Credit      \n";
            cout << "\t\t\t       ------      \n";
            cout << "\t\t\t        EXIT      \n";
            cout << "\t\t\t       ------       \n";
            cout << "\n\n\n\n\n\n\n\n";
            cout << "........                ..          ...         ...........             ..."       << endl;
            cout << "........	       ....         ...         ...........             ..."            << endl;
            cout << "..    ..              ......        ...         ...                     ..."       << endl;
            cout << "..    ..             ........       ...         ...                     ..."       << endl;
            cout << "..    ..            ..........      ...         .........               ..."       << endl;
            cout << "........   .....       ....         ...         ..........   .....      ..."       << endl;
            cout << "........   .....       ....         ...                 ..   .....   .........."   << endl;
            cout << "..    ..               ....         ...         ...     ..            ........"    << endl;
            cout << "..    ..               ....         ...         ...     ..             ......"     << endl;
            cout << "........               ....         ...         ..........              ...."      << endl;
            cout << "........               ....         ...         ..........               .."       << endl;
            /*
            cout << "                                                                       ";
            cout << "m_carre = " << m_carre;
            cout << "                                                     ";
            cout << "8 = Haut 5 = Bas  0 = Entre" << endl;*/
        }
        if ( m_carre == 1 )
        {
            cout << "\n\t\t\t     CONTINUER    \n";
            cout << "\t\t\t     ---------    \n";
            cout << "\t\t\t                   \n";
            cout << "\t\t\t  Nouvelle Partie  \n";
            cout << "\t\t\t  ---------------  \n";
            cout << "\t\t\t __________________\n";
            cout << "\t\t\t|                  |\n";
            cout << "\t\t\t|      Credit      |\n";
            cout << "\t\t\t|__________________|\n";
            cout << "\t\t\t        EXIT       \n";
            cout << "\t\t\t       ------       \n";
            cout << "\n\n\n\n\n\n\n\n";
            cout << "........                ..          ...         ...........             ..."       << endl;
            cout << "........	       ....         ...         ...........             ..."            << endl;
            cout << "..    ..              ......        ...         ...                     ..."       << endl;
            cout << "..    ..             ........       ...         ...                     ..."       << endl;
            cout << "..    ..            ..........      ...         .........               ..."       << endl;
            cout << "........   .....       ....         ...         ..........   .....      ..."       << endl;
            cout << "........   .....       ....         ...                 ..   .....   .........."   << endl;
            cout << "..    ..               ....         ...         ...     ..            ........"    << endl;
            cout << "..    ..               ....         ...         ...     ..             ......"     << endl;
            cout << "........               ....         ...         ..........              ...."      << endl;
            cout << "........               ....         ...         ..........               .."       << endl;
        }
        if ( m_carre == 0 )
        {
            cout << "\n\t\t\t     CONTINUER    \n";
            cout << "\t\t\t     ---------    \n";
            cout << "\t\t\t                   \n";
            cout << "\t\t\t  Nouvelle Partie  \n";
            cout << "\t\t\t  ---------------  \n";
            cout << "\t\t\t       Credit      \n";
            cout << "\t\t\t       ------      \n";
            cout << "\t\t\t __________________ \n";
            cout << "\t\t\t|                  | \n";
            cout << "\t\t\t|       EXIT       | \n";
            cout << "\t\t\t|__________________| \n";
            cout << "\n\n\n\n\n\n\n\n";
            cout << "........                ..          ...         ...........             ..."       << endl;
            cout << "........	       ....         ...         ...........             ..."            << endl;
            cout << "..    ..              ......        ...         ...                     ..."       << endl;
            cout << "..    ..             ........       ...         ...                     ..."       << endl;
            cout << "..    ..            ..........      ...         .........               ..."       << endl;
            cout << "........   .....       ....         ...         ..........   .....      ..."       << endl;
            cout << "........   .....       ....         ...                 ..   .....   .........."   << endl;
            cout << "..    ..               ....         ...         ...     ..            ........"    << endl;
            cout << "..    ..               ....         ...         ...     ..             ......"     << endl;
            cout << "........               ....         ...         ..........              ...."      << endl;
            cout << "........               ....         ...         ..........               .."       << endl;
        }
        int a;
        cin >> a;
        if ( a == 5 )
        {
            m_carre--;
        }
        if ( a == 8 )
        {
            m_carre++;
        }
        if ( m_carre == 4 )
        {
            m_carre = 3;
        }
        if ( m_carre == -1 )
        {
           m_carre = 0;
        }
        if ( a == 0 )
        {
            b = m_carre;
            m_carre = -1;
        }
    }while(m_carre == 0 || m_carre == 1 || m_carre == 2 || m_carre == 3 );
    system("CLS");

    return b;

}
/*void Begin::affichierSourie()
{
    cout << "La methode Affiche Sourie";
}

void Begin::modeDebug()
{
    cout << "La methode debug";
}
*/
